#include "csapp.h"
#include "stdio.h"
int main (int argc,char **argv)
{
    struct star star;
    char *type ,*readok;
    
    Stat(argv[1], &stat);
    if(I_ISREG(stat.st_mode))
         type = "regylar";
    else if (S_ISDIR(stat.st_mode))
         type = "directory";
    else 
         type = "other";
    if ((stat.st_mode & S_IRUSR))
         readok="yes";
    else 
         readok="no";
    printf("type: %s, read:%s\n",type, readok);
    exit(0)
